<?php
ob_start();
if(isset($_SERVER['HTTP_APPVERSION'])){
include "./saesiteinfo.php";
}else{
 if(!file_exists("./install/install.lock")){
header('location:./install');
exit;
 }else{
include "./siteinfo.php";
 }
}
include "./function.php";
//连接数据库
$localhost=mysql_connect($sqlhost,$sqluser,$sqlpass)or die("无法连接服务器");
mysql_select_db($sqldata,$localhost);
if (isset($_COOKIE["SHANIUUSER"]) && isset($_COOKIE["SHANIUPASS"])){
$user=$_COOKIE["SHANIUUSER"];
$pass=$_COOKIE["SHANIUPASS"];
//获取用户资料
$mysql = mysql_query("SELECT * FROM user WHERE user='$user'");
$sql= mysql_fetch_array($mysql);
//获取QQ数
$qqnumsql="SELECT COUNT(id) FROM qqlist WHERE myqq='$user' ";
$qqnumqqlist = mysql_fetch_array( mysql_query($qqnumsql) );
$qqnum=$qqnumqqlist[0];
//记录IP
if($_SERVER['HTTP_APPVERSION']){
     $ip = $_SERVER["REMOTE_ADDR"];
}else{
$ip=ip();
}
$result=mysql_query("select * from `ip` where `ip`='$ip'");
if(mysql_num_rows($result)<=0){
$addip = mysql_query("INSERT INTO `ip` (`ip`) VALUES ('$ip')");
}
?>
<html>
<head>
<meta content="width=device-width,user-scalable=no" name="viewport">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>挂Q小提示 - <?php echo $sitename; ?></title>
<meta name="keywords" content="秒赞,秒评,离线秒赞,<?php echo $sitename; ?>,离线秒评,秒赞,云挂机">
<meta name="description" content="<?php echo $sitename; ?>【<?php echo $wangzhi; ?>】最有潜力的网站.">
<link rel="stylesheet" type="text/css" href="css/register.css"/>
</head>
<body>
<div class='signup_container'>
    <h1 class='signup_title'><?php echo $sitename; ?>推广中心</h1>
            <div id="signup_forms" class="signup_forms clearfix">
                    <div class="form_row">
   <p><font size="3">每推广10位网友可获得5挂Q配额</font></p>
                                      </div>
                                      <div class="form_row"></div>
              <div class="form_row">
                        推广人数:<b><font color="red">
<?php
if (empty($_GET['do'])){
echo $sql['tui']; 
}else{

if($_GET['do']=="qplus"){

if ($sql['tui']<="9"){
echo $sql['tui'];
}else{
$tui=$sql['tui']-10;
echo $tui;
}

}

}
?></font></b>人
              </div>
              <div class="form_row"></div>
                   <div class="form_row">
                        增加挂Q配额:<?php
if (empty($_GET['do'])){
echo '<a href="./center.php?do=qplus"><b><font color=red>增加配额</font></b></a>'; 
}else{

if($_GET['do']=="qplus"){
if ($sql['tui']<="9"){
echo "<b><font color=red>未满足要求</font></b>";
}else{
$tui=$sql['tui']-10;
$peie=$sql['peie']+5;
mysql_query("UPDATE user SET tui='$tui' WHERE user= '$user'");
mysql_query("UPDATE user SET peie='$peie' WHERE user= '$user'");
echo '<a href="./center.php?do=qplus"><b><font color=red>扩充成功</font></b></a>';
}
}

}
?>
              </div>
              <div class="form_row"></div>
              <div class="form_row">
                        推广地址:<b><font color=red><?php echo "http://".$_SERVER['HTTP_HOST']."/?SNID=".$sql['id']; ?></font></b>
              </div>
              <div class="form_row"></div>
                    <div class="form_row">
推广方式一:<b><font color=red>QQ群推广</font></b>
                    </div>
                    <div class="form_row"></div>
                    <div class="form_row">
					<textarea readonly="readonly" style="width:260px;height:190px;resize:none;">
<?php echo $sitename; ?>强势来袭~加入吧。
【微网络秒赞评的优势】
1.网页秒赞评，即使关机以后QQ也会在线。
2.强大的技术支持~可自动更新sid。
3.简单的操作界面~入手即可使用。
【<?php echo $sitename; ?>的优势】
1.支持自动更新SID码,省去更新烦恼。
2.支持批量导入QQ号,省去输入烦恼。
3.支持批量删除QQ号,省去操作烦恼。
【体验地址:<?php echo "http://".$_SERVER['HTTP_HOST']."/?SNID=".$sql['id']; ?>】
</textarea>
                    </div>
                               
</div>
<tr>
<td colspan="2" align="center"><a href="./user.php">返回用户中心</a></td>
</tr>
</body>
</html>
<?php
}else{
header("Location:./tishi.php");
}
?>